# Maintainer:
pkgname=m17n-db
pkgver=1.8.5
pkgrel=0
# the i18n/charmaps are in the glibc source
_glibc=2.37
pkgdesc="gnu M-text multilingualization data"
url="https://www.nongnu.org/m17n/"
arch="noarch"
license="LGPL-2.1-or-later"
# FIXME: bb awk hangs
depends_dev="$pkgname=$pkgver-r$pkgrel"
makedepends="mawk gettext-dev"
subpackages="$pkgname-lang $pkgname-dev"
source="https://download.savannah.gnu.org/releases/m17n/m17n-db-$pkgver.tar.gz
	glibc-$_glibc.tar.xz::https://ftp.gnu.org/gnu/glibc/glibc-$_glibc.tar.xz
	"

build() {
	./configure \
		--host=$CHOST \
		--build=$CBUILD \
		--prefix=/usr \
		--with-charmaps="$srcdir"/glibc-$_glibc/localedata/charmaps/ \
		AWK=mawk
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
	mkdir -p "$pkgdir"/usr/lib
	mv "$pkgdir"/usr/share/pkgconfig "$pkgdir"/usr/lib/
}

sha512sums="
6c3f42072b7e0a36870fd8143fb1ac7c3efc21c41869d984dfa0cbb87eb1f9958e429f1144a975b401791f0423386a03ab02531f162496531e303d9b0e049987  m17n-db-1.8.5.tar.gz
4fc5932f206bb1b8b54828a28af1a681616b838bbab60c81c82155f3629cbfe1301d271af65511ed917f4c6949a025429221fe6035753282f15346919f15b90c  glibc-2.37.tar.xz
"
